*/
ClutterActor *
shell_app_create_icon_texture (ShellApp *app,
- float size)
+ int size)
{
GIcon *icon;
ClutterActor *ret;
icon = g_app_info_get_icon (G_APP_INFO (gmenu_tree_entry_get_app_info (app->entry)));
if (icon != NULL)
- ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, (int)size);
+ ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size);
if (ret == NULL)
{
icon = g_themed_icon_new ("application-x-executable");
- ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, (int)size);
+ ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size);
g_object_unref (icon);
}
if (icon != NULL)
{
info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
- icon, (int) (size + 0.5),
+ icon, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
}
{
icon = g_themed_icon_new ("application-x-executable");
info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
- icon, (int) (size + 0.5),
+ icon, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
g_object_unref (icon);
}
* Return value: (transfer none): A floating #ClutterActor, or %NULL if no icon
*/
ClutterActor *
-shell_app_get_faded_icon (ShellApp *app, float size)
+shell_app_get_faded_icon (ShellApp *app, int size)
{
CoglHandle texture;
ClutterActor *result;
}
- cache_key = g_strdup_printf ("faded-icon:%s,size=%f", shell_app_get_id (app), size);
+ cache_key = g_strdup_printf ("faded-icon:%s,size=%d", shell_app_get_id (app), size);
data.app = app;
- data.size = (int) (0.5 + size);
+ data.size = size;
texture = st_texture_cache_load (st_texture_cache_get_default (),
cache_key,
ST_TEXTURE_CACHE_POLICY_FOREVER,
else
{
result = clutter_texture_new ();
- g_object_set (result, "opacity", 0, "width", size, "height", size, NULL);
+ g_object_set (result, "opacity", 0, "width", (float) size, "height", (float) size, NULL);
}
return result;
GMenuTreeEntry *shell_app_get_tree_entry (ShellApp *app);
GDesktopAppInfo *shell_app_get_app_info (ShellApp *app);
-ClutterActor *shell_app_create_icon_texture (ShellApp *app, float size);
-ClutterActor *shell_app_get_faded_icon (ShellApp *app, float size);
+ClutterActor *shell_app_create_icon_texture (ShellApp *app, int size);
+ClutterActor *shell_app_get_faded_icon (ShellApp *app, int size);
const char *shell_app_get_name (ShellApp *app);
const char *shell_app_get_description (ShellApp *app);
gboolean shell_app_is_window_backed (ShellApp *app);